package com.pubinfo.passbook.common.model.http.esb;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import java.util.ArrayList;
import java.util.List;

public class Test {
  public static void main(String[] args) {
//        EsbRequest esbRequest=new EsbRequest();
//        EsbParam esbParam=new EsbParam();
//        esbParam.setIdCard("11111111111111111111111");
//        esbParam.setStaffName("11111111111111111111111");
//        List<EsbParam> list=new ArrayList<>();
//        list.add(esbParam);
//        esbRequest.setParam(list);
//        EsbRequestBase esbBase=new EsbRequestBase();
//        esbBase.setSysId("51");
//        esbBase.setUserId("100000013324");
//        esbBase.setService("staffBaseInfoQueryForSSCService");
//        esbBase.setSignature("e2398beef8493fdd88e43fab4ecd87");
//        esbBase.setRandomNum("13579046");
//        esbBase.setTimestamp("1431067080349");
//        esbBase.setBizId("250000234534");
//        esbRequest.setBase(esbBase);
//        System.out.println(JSON.toJSON(esbRequest));
    String s = "{\n" +
        "\t\"base\": {\n" +
        "\t\t\"resCode\": \"0000\", //结果编码，具体参考附录6\n" +
        "\t\t\"resMsg\": \"处理成功\", //处理：结果描述信息\n" +
        "\t\t\"transId\": \"\" //服务端系统业务处理流水号\n" +
        "\t},\n" +
        "\t\"data\": [{\n" +
        "\"staffName\": \"测试1\",//姓名\n" +
        "\t\t\"staffCode\": \"3300001@ZJ\" ,//人员编码\n" +
        "\t\t\"staffPhone\": \"18912345678\", //手机号\n" +
        "\t\t\"areaName\": \"杭州分公司\", //地市\n" +
        "\t\t\"countyName\": \"余杭分公司\", //区县\n" +
        "\"deptName\": \"xxx部\", //部门\n" +
        "\t\t\"postLevel\": \"10\", //岗级\n" +
        "\t\t\"natureName\": \"合同\", //用工性质：合同、外包、代理\n" +
        "\t\t\"staffStatus\": \"退休\", //人员状态：在职、离休、退休、内退\n" +
        "\t\t\"workTime\": \"30\", //工龄\n" +
        "\"workTimeTele\": \"30\" ,//电信工龄\n" +
        "\"birthDate\": \"1970-01-01\" //生日日期\n" +
        "\t\t   }\n" +
        "]\n" +
        "}\n";
    JSONObject jsonObject = JSON.parseObject(s);
    System.out.println(JSON.toJavaObject(jsonObject, EsbReturn.class));
  }
  
}
